package com.example.jpa.demo_jpa.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RouterController {
    @RequestMapping("/view_index")
    public String index(){
        return "views/view_index";
    }

    @RequestMapping("/toLogin")
    public String toLogin(){
        return "views/login";
    }

    @RequestMapping("/vip1/{id}")
    public String vip1(@PathVariable("id") int id){
        return "views/vip1/" + id;
    }

    @RequestMapping("/vip2/{id}")
    public String vip2(@PathVariable("id") int id){
        return "views/vip2/" + id;
    }

}
